<template>
  <div class="swiper">
    <swiper :options="swiperOption" ref="mySwiper">
      <!-- slides -->
      <swiper-slide>
        <img class="swiper-img" src="https://shopstatic.vivo.com.cn/vivoshop/commodity/20180430/20180430232146894398_original.jpg" alt="">
      </swiper-slide>
      <swiper-slide>
        <img class="swiper-img" src="https://shopstatic.vivo.com.cn/vivoshop/commodity/20180418/20180418104131830678_original.jpg" alt="">
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>
<script>
export default {
  name: 'HomeSwiper',
  data(){
    return {
      swiperOption: {
          autoplay: 3000,
          loop: true,
          pagination: '.swiper-pagination'
        }
    }
  }
}
</script>

<style lang="less">
  .swiper{
    width: 100%;
    display: block;
    padding-top: 1.5rem;
    .swiper-img{
      width: 100%;
    }
  }
</style>
